<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-point-add">
			<input  name="userId" type="hidden" th:value="*{user.id}">
			<div class="form-group">	
				<label class="col-sm-3 control-label">直购电用户：</label>
				<div class="col-sm-8">
					<input th:value="*{user.name}" readonly="readonly" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">用户户号：</label>
				<div class="col-sm-8">
					<select id="userNum" name="userNum" class="form-control m-b">
						<option th:each="n : ${num}" th:text="${n}" th:value="${n}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点名称：</label>
				<div class="col-sm-8">
					<input id="name" name="name" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点代码：</label>
				<div class="col-sm-8">
					<input id="code" name="code" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量电压等级：</label>
				<div class="col-sm-8">
					<select id="voltageGrade" class="form-control m-b" name="voltageGrade"  th:with="type=${@dict.getType('voltage_grade')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">目录电价明细类别：</label>
				<div class="col-sm-8">
					<select id="priceDetailType" name="priceDetailType" class="form-control m-b"   th:with="type=${@dict.getType('price_detail_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">基础电价计费方式：</label>
				<div class="col-sm-8">
					<select id="basicsPriceType" name="basicsPriceType"   class="form-control m-b"   th:with="type=${@dict.getType('basics_price_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">计量点类型(数据字典)：</label>
				<div class="col-sm-8">
					<select id="pointType" name="pointType"  class="form-control m-b"   th:with="type=${@dict.getType('point_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">产权归属：</label>
				<div class="col-sm-8">
					<input id="ascription" name="ascription" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">产权分界点：</label>
				<div class="col-sm-8">
					<input id="ascriptionCutoff" name="ascriptionCutoff" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "basics/point"
		$("#form-point-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
		    console.log($('#form-point-add').serialize());
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-point-add').serialize());
	        }
	    }
	</script>
</body>
</html>
